﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Newtonsoft.Json;

namespace SAP.People
{
    class Employee
    {
        // Simple properties
        [JsonIgnore]
        public int NodeId { get; set; }
        public int UserId { get; set; }
        public string FirstName { get; set; }
        public string LastName { get; set; }
        public int NumberOfChildren { get; set; }

        // Relationship
        [JsonIgnore]
        public Employee Manager { get; set; }
        [JsonIgnore]
        public IList<Employee> Subordinates { get; set; }

        // Detailed properties
        public string Alias { get; set; }
        public string JobTitle { get; set; }
        public string JobType { get; set; }
        public string Email { get; set; }
        public string Mobile { get; set; }

        // Grade Level
        public string GradeLevel { get; set; }

        public string FullName { get { return FirstName + " " + LastName; } }
        //public string ManagerName { get { return Manager == null ? "" : Manager.FullName + " (" + Manager.Alias + ")"; } }
        public string ManagerName { get { return Manager == null ? "" : Manager.FullName; } }

        public override string ToString()
        {
            return FullName;
        }
    }
}
